/**
 * Created by shaotingzhou on 2017/5/9.
 */
// 统计一级页面的中间部分
import React, { Component } from 'react';
import {
    AppRegistry,
    StyleSheet,
    Text,
    View,
    Image,
    TouchableOpacity
} from 'react-native';
import Songs from './songs/songs'
export default class StatisticsItem extends Component {
    render() {
        return (
            <TouchableOpacity style={{marginTop:1,backgroundColor:'white'}} onPress={() => this.itemOnclick()}>
                <View style={{marginTop:8,marginBottom:8,flexDirection:'row',alignItems:'center'}}>
                    <View style={{width:20,height:20,backgroundColor:this.props.color,marginLeft:10}}></View>
                    <View style={{marginLeft:10}}>
                        <Text style={{fontSize:15}}>{this.props.topTxt}</Text>
                        <Text style={{fontSize:12,color:'#AAAAAA'}}>{this.props.bottomTxt}</Text>
                    </View>
                    <Image source={require('../image/右箭头.png')} style={{width:20,height:15,position:'absolute',right:10}} />
                </View>
            </TouchableOpacity>
        );
    }

    itemOnclick =() => {
        // alert(this.props.topTxt)
        this.props.mynavigator.push({
            component:Songs
        })
    }

}

const styles = StyleSheet.create({
    container: {
        flex: 1,
    }
});